#ifndef YOCTO_CELL_DYN_MT_INCLUDED
#define YOCTO_CELL_DYN_MT_INCLUDED 1


#include "core/cell-dyn.hpp"
#include "yocto/threading/team.hpp"

namespace FastMD
{
	typedef threading::team Team;
	typedef Team::task      Task;
	
	//! Multi Threaded Dynamics.
	class CellDynamicsMT : public Team, public CellDynamicsBase
	{
	public:
		explicit CellDynamicsMT( const Frame &frame, const Real CutOut);
		virtual ~CellDynamicsMT() throw();
		
		
		virtual void eval( Frame &frame , Potential &potential, bool isothermal) throw();
		
		
	private:
		YOCTO_DISABLE_COPY_AND_ASSIGN(CellDynamicsMT);
		Frame                 *frame_;
		Potential             *potential_;
		Task                   task_;
		void call( Team::context &ctx ) throw();
	};
	
}

#endif
